/**
 * Created by Administrator on 2017/3/25.
 */
var ChildGender= React.createClass({
    render:function () {
        return <select onChange={this.props.handleChange}>
            <option value="0">男</option>
            <option value="1">女</option>

        </select>
    }
});

var ParentForm = React.createClass({
    getInitialState:function () {
        return {gender:0}
    },
    handleChange:function (e) {
        this.setState({gender:e.target.value});
    },
    render:function () {
      return <form>
          <ChildGender handleChange={this.handleChange}></ChildGender>
      </form>  
    }
});


ReactDOM.render(<ParentForm></ParentForm>, document.body);